﻿using UnityEngine;
using System.Collections;

public class GoldBall : MonoBehaviour {

	MapMaster mapMaster;

	// Use this for initialization
	void Awake () {
		mapMaster = GameObject.Find ("MapMaster").GetComponent<MapMaster>();
		mapMaster.RegisterGoldBall (this);
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void OnTriggerEnter2D(Collider2D c){

		this.gameObject.SetActive (false);
		mapMaster.PlayerEatGoldBall (this);
	}
}
